program lx9
var n:integer;
total:integer;
procedure try(val x,y:integer,val s:string):void;
var i:integer;
begin
  if((x=n)and(y=n))then 
  begin
   total:=total+1;
   write('[',total,']',s+'s')
  end
else
begin
 if(x<n)then try(x+1,y,s+'(');
 if(y<x)then try(x,y+1,s+')')
end
end
begin
  write('N=');
  total:=0;
  try(0,0,'')
end